package lbframework.bean.toolBarPadrao;

import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JComponent;
import javax.swing.KeyStroke;
import lbframework.classe.Util;
import lbframework.bean.internalFrame.LBInternalFrame;

public class LBToolBarPadrao extends javax.swing.JToolBar {

    private LBInternalFrame internalFrame = null;

    public LBToolBarPadrao() {
        initComponents();

        setVisibleConsultar(false);
        setVisibleIncluir(false);
        setVisibleEditar(false);
        setVisibleSalvar(false);
        setVisibleExcluir(false);
        setVisibleImprimir(false);
        setVisibleSair(false);
        setVisibleCancelar(false);
        setVisibleIniciar(false);
        setVisibleCopiar(false);
        setVisibleBaixar(false);
        setVisibleExportar(false);
        setVisibleParametrizar(false);
        setVisibleConfigurar(false);
        setVisibleImportar(false);
        setVisibleEstornar(false);
        setVisibleFiltro(false);
        setVisibleFinalizar(false);
    }

    public LBToolBarPadrao(LBInternalFrame i_internalFrame) {
        this();
        internalFrame = i_internalFrame;
    }

    public void setConsultar(boolean value) {
        try {
            if (value) {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F1"), "consultar");
                internalFrame.getActionMap().put("consultar", new AbstractAction("consultar") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                        btnConsultarActionPerformed(null);
                    }
                });
            } else {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F1"), "consultar");
                internalFrame.getActionMap().put("consultar", new AbstractAction("consultar") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                    }
                });
            }
        } catch (Exception ex) {
        }
    }

    public void setExcluir(boolean value) {
        try {
            if (value) {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F7"), "excluir");
                internalFrame.getActionMap().put("excluir", new AbstractAction("excluir") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                        btnExcluirActionPerformed(null);
                    }
                });
            } else {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F7"), "excluir");
                internalFrame.getActionMap().put("excluir", new AbstractAction("excluir") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                    }
                });
            }
        } catch (Exception ex) {
        }
    }

    public void setIncluir(boolean value) {
        try {
            if (value) {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F2"), "incluir");
                internalFrame.getActionMap().put("incluir", new AbstractAction("incluir") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                        btnIncluirActionPerformed(null);
                    }
                });
            } else {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F2"), "incluir");
                internalFrame.getActionMap().put("incluir", new AbstractAction("incluir") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                    }
                });
            }
        } catch (Exception ex) {
        }
    }

    public void setSalvar(boolean value) {
        try {
            if (value) {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F3"), "salvar");
                internalFrame.getActionMap().put("salvar", new AbstractAction("salvar") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                        btnSalvarActionPerformed(null);
                    }
                });
            } else {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F3"), "salvar");
                internalFrame.getActionMap().put("salvar", new AbstractAction("salvar") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                    }
                });
            }
        } catch (Exception ex) {
        }
    }

    public void setImprimir(boolean value) {
        try {
            if (value) {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F4"), "imprimir");
                internalFrame.getActionMap().put("imprimir", new AbstractAction("imprimir") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                        btnImprimirActionPerformed(null);
                    }
                });
            } else {
                internalFrame.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke("F4"), "imprimir");
                internalFrame.getActionMap().put("imprimir", new AbstractAction("imprimir") {

                    @Override
                    public void actionPerformed(ActionEvent evt) {
                    }
                });
            }
        } catch (Exception ex) {
        }
    }

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnConsultar = new lbframework.bean.button.LBButton();
        btnIncluir = new lbframework.bean.button.LBButton();
        btnSalvar = new lbframework.bean.button.LBButton();
        btnExcluir = new lbframework.bean.button.LBButton();
        btnImprimir = new lbframework.bean.button.LBButton();
        btnCancelar = new lbframework.bean.button.LBButton();
        btnIniciar = new lbframework.bean.button.LBButton();
        btnCopiar = new lbframework.bean.button.LBButton();
        btnBaixar = new lbframework.bean.button.LBButton();
        btnExportar = new lbframework.bean.button.LBButton();
        btnImportar = new lbframework.bean.button.LBButton();
        btnParametrizar = new lbframework.bean.button.LBButton();
        btnConfigurar = new lbframework.bean.button.LBButton();
        btnEstornar = new lbframework.bean.button.LBButton();
        btnFiltro = new lbframework.bean.button.LBButton();
        btnSair = new lbframework.bean.button.LBButton();
        btnFinalizar = new lbframework.bean.button.LBButton();
        btnEditar = new lbframework.bean.button.LBButton();

        setFloatable(false);

        btnConsultar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/consultar.png"))); // NOI18N
        btnConsultar.setToolTipText("Consultar (F1)");
        btnConsultar.setFocusable(false);
        btnConsultar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnConsultar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnConsultar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConsultarActionPerformed(evt);
            }
        });
        add(btnConsultar);

        btnIncluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/incluir.png"))); // NOI18N
        btnIncluir.setToolTipText("Incluir (F2)");
        btnIncluir.setFocusable(false);
        btnIncluir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnIncluir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnIncluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnIncluirActionPerformed(evt);
            }
        });
        add(btnIncluir);

        btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/salvar.png"))); // NOI18N
        btnSalvar.setToolTipText("Salvar (F3)");
        btnSalvar.setFocusable(false);
        btnSalvar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSalvar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });
        add(btnSalvar);

        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/excluir.png"))); // NOI18N
        btnExcluir.setToolTipText("Excluir (F7)");
        btnExcluir.setFocusable(false);
        btnExcluir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnExcluir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExcluirActionPerformed(evt);
            }
        });
        add(btnExcluir);

        btnImprimir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/imprimir.png"))); // NOI18N
        btnImprimir.setToolTipText("Imprimir (F4)");
        btnImprimir.setFocusable(false);
        btnImprimir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnImprimir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirActionPerformed(evt);
            }
        });
        add(btnImprimir);

        btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/cancelar.png"))); // NOI18N
        btnCancelar.setToolTipText("Cancelar");
        btnCancelar.setFocusable(false);
        btnCancelar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCancelar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnCancelar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnCancelarMouseEntered(evt);
            }
        });
        btnCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarActionPerformed(evt);
            }
        });
        add(btnCancelar);

        btnIniciar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/iniciar.png"))); // NOI18N
        btnIniciar.setToolTipText("Iniciar");
        btnIniciar.setFocusable(false);
        btnIniciar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnIniciar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnIniciar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnIniciarActionPerformed(evt);
            }
        });
        add(btnIniciar);

        btnCopiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/copiar.png"))); // NOI18N
        btnCopiar.setToolTipText("Copiar");
        btnCopiar.setFocusable(false);
        btnCopiar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCopiar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnCopiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCopiarActionPerformed(evt);
            }
        });
        add(btnCopiar);

        btnBaixar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/baixar.png"))); // NOI18N
        btnBaixar.setToolTipText("Baixar");
        btnBaixar.setFocusable(false);
        btnBaixar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnBaixar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnBaixar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBaixarActionPerformed(evt);
            }
        });
        add(btnBaixar);

        btnExportar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/exportar.png"))); // NOI18N
        btnExportar.setToolTipText("Exportar");
        btnExportar.setFocusable(false);
        btnExportar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnExportar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnExportar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExportarActionPerformed(evt);
            }
        });
        add(btnExportar);

        btnImportar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/importar.png"))); // NOI18N
        btnImportar.setToolTipText("Importar");
        btnImportar.setFocusable(false);
        btnImportar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnImportar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnImportar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImportarActionPerformed(evt);
            }
        });
        add(btnImportar);

        btnParametrizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/parametrizar.png"))); // NOI18N
        btnParametrizar.setToolTipText("Parametrizar");
        btnParametrizar.setFocusable(false);
        btnParametrizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnParametrizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnParametrizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnParametrizarActionPerformed(evt);
            }
        });
        add(btnParametrizar);

        btnConfigurar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/configurar.png"))); // NOI18N
        btnConfigurar.setToolTipText("Configurar");
        btnConfigurar.setFocusable(false);
        btnConfigurar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnConfigurar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnConfigurar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnConfigurarActionPerformed(evt);
            }
        });
        add(btnConfigurar);

        btnEstornar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/estornar.png"))); // NOI18N
        btnEstornar.setToolTipText("Estornar");
        btnEstornar.setFocusable(false);
        btnEstornar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnEstornar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnEstornar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEstornarActionPerformed(evt);
            }
        });
        add(btnEstornar);

        btnFiltro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/filtro.png"))); // NOI18N
        btnFiltro.setToolTipText("Filtro");
        btnFiltro.setFocusable(false);
        btnFiltro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnFiltro.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnFiltro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFiltroActionPerformed(evt);
            }
        });
        add(btnFiltro);

        btnSair.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/sair.png"))); // NOI18N
        btnSair.setToolTipText("Sair (ESC)");
        btnSair.setFocusable(false);
        btnSair.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnSair.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });
        add(btnSair);

        btnFinalizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/finalizar.png"))); // NOI18N
        btnFinalizar.setToolTipText("Finalizar");
        btnFinalizar.setFocusable(false);
        btnFinalizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnFinalizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnFinalizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFinalizarActionPerformed(evt);
            }
        });
        add(btnFinalizar);

        btnEditar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lbframework/img/alterar.png"))); // NOI18N
        btnEditar.setToolTipText("Editar");
        btnEditar.setFocusable(false);
        btnEditar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnEditar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnEditar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEditarActionPerformed(evt);
            }
        });
        add(btnEditar);
    }// </editor-fold>//GEN-END:initComponents

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed
        try {
            internalFrame.sair();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());
        }
}//GEN-LAST:event_btnSairActionPerformed

    private void btnConsultarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConsultarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.consultar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
}//GEN-LAST:event_btnConsultarActionPerformed

    private void btnIncluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIncluirActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.incluir();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnIncluirActionPerformed

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.salvar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnSalvarActionPerformed

    private void btnExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExcluirActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.excluir();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnExcluirActionPerformed

    private void btnImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.imprimir();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnImprimirActionPerformed

    private void btnCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.cancelar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnCancelarActionPerformed

    private void btnIniciarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnIniciarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.iniciar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnIniciarActionPerformed

    private void btnCopiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCopiarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.copiar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
}//GEN-LAST:event_btnCopiarActionPerformed

    private void btnBaixarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBaixarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.baixar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnBaixarActionPerformed

    private void btnExportarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.exportar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnExportarActionPerformed

    private void btnParametrizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnParametrizarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.parametrizar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
}//GEN-LAST:event_btnParametrizarActionPerformed

    private void btnImportarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImportarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.importar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnImportarActionPerformed

    private void btnEstornarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEstornarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.estornar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnEstornarActionPerformed

    private void btnCancelarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCancelarMouseEntered
    }//GEN-LAST:event_btnCancelarMouseEntered

    private void btnFiltroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFiltroActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.filtro();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnFiltroActionPerformed

    private void btnFinalizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFinalizarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.finalizar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnFinalizarActionPerformed

    private void btnConfigurarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnConfigurarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.configurar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
    }//GEN-LAST:event_btnConfigurarActionPerformed

    private void btnEditarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditarActionPerformed
        try {
            internalFrame.setWaitCursor();
            internalFrame.editar();

        } catch (Exception ex) {
            Util.exibirMensagemErro(ex, internalFrame.getTitle());

        } finally {
            internalFrame.setDefaultCursor();
        }
}//GEN-LAST:event_btnEditarActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private lbframework.bean.button.LBButton btnBaixar;
    private lbframework.bean.button.LBButton btnCancelar;
    private lbframework.bean.button.LBButton btnConfigurar;
    private lbframework.bean.button.LBButton btnConsultar;
    private lbframework.bean.button.LBButton btnCopiar;
    private lbframework.bean.button.LBButton btnEditar;
    private lbframework.bean.button.LBButton btnEstornar;
    private lbframework.bean.button.LBButton btnExcluir;
    private lbframework.bean.button.LBButton btnExportar;
    private lbframework.bean.button.LBButton btnFiltro;
    private lbframework.bean.button.LBButton btnFinalizar;
    private lbframework.bean.button.LBButton btnImportar;
    private lbframework.bean.button.LBButton btnImprimir;
    private lbframework.bean.button.LBButton btnIncluir;
    private lbframework.bean.button.LBButton btnIniciar;
    private lbframework.bean.button.LBButton btnParametrizar;
    private lbframework.bean.button.LBButton btnSair;
    private lbframework.bean.button.LBButton btnSalvar;
    // End of variables declaration//GEN-END:variables

    public boolean isVisibleCancelar() {
        return btnCancelar.isVisible();
    }

    public void setVisibleCancelar(boolean valor) {
        btnCancelar.setVisible(valor);
    }

    public boolean isEnabledCancelar() {
        return btnCancelar.isEnabled();
    }

    public void setEnabledCancelar(boolean valor) {
        btnCancelar.setEnabled(valor);
    }

    public boolean isVisibleConsultar() {
        return btnConsultar.isVisible();
    }

    public void setVisibleConsultar(boolean valor) {
        btnConsultar.setVisible(valor);
        setConsultar(valor);
    }

    public boolean isEnabledConsultar() {
        return btnConsultar.isEnabled();
    }

    public void setEnabledConsultar(boolean valor) {
        btnConsultar.setEnabled(valor);
        setConsultar(valor);
    }

    public boolean isVisibleIncluir() {
        return btnIncluir.isVisible();
    }

    public void setVisibleIncluir(boolean valor) {
        btnIncluir.setVisible(valor);
        setIncluir(valor);
    }

    public void setVisibleEditar(boolean valor) {
        btnEditar.setVisible(valor);
    }

    public boolean isVisibleEditar() {
        return btnEditar.isVisible();
    }

    public boolean isEnabledEditar() {
        return btnEditar.isEnabled();
    }

    public void setEnabledEditar(boolean valor) {
        btnEditar.setEnabled(valor);
    }

    public boolean isEnabledIncluir() {
        return btnIncluir.isEnabled();
    }

    public void setEnabledIncluir(boolean valor) {
        btnIncluir.setEnabled(valor);
        setIncluir(valor);
    }

    public boolean isVisibleSalvar() {
        return btnSalvar.isVisible();
    }

    public void setVisibleSalvar(boolean valor) {
        btnSalvar.setVisible(valor);
        setSalvar(valor);
    }

    public boolean isEnabledSalvar() {
        return btnSalvar.isEnabled();
    }

    public void setEnabledSalvar(boolean valor) {
        btnSalvar.setEnabled(valor);
        setSalvar(valor);
    }

    public boolean isVisibleExcluir() {
        return btnExcluir.isVisible();
    }

    public void setVisibleExcluir(boolean valor) {
        btnExcluir.setVisible(valor);
        setExcluir(valor);
    }

    public boolean isEnabledExcluir() {
        return btnExcluir.isEnabled();
    }

    public void setEnabledExcluir(boolean valor) {
        btnExcluir.setEnabled(valor);
        setExcluir(valor);
    }

    public boolean isVisibleImprimir() {
        return btnImprimir.isVisible();
    }

    public void setVisibleImprimir(boolean valor) {
        btnImprimir.setVisible(valor);
        setImprimir(valor);
    }

    public boolean isEnabledImprimir() {
        return btnImprimir.isEnabled();
    }

    public void setEnabledImprimir(boolean valor) {
        btnImprimir.setEnabled(valor);
        setImprimir(valor);
    }

    public boolean isVisibleSair() {
        return btnSair.isVisible();
    }

    public void setVisibleSair(boolean valor) {
        btnSair.setVisible(valor);
    }

    public boolean isEnabledSair() {
        return btnSair.isEnabled();
    }

    public void setEnabledSair(boolean valor) {
        btnSair.setEnabled(valor);
    }

    public boolean isVisibleIniciar() {
        return btnIniciar.isVisible();
    }

    public void setVisibleIniciar(boolean valor) {
        btnIniciar.setVisible(valor);
    }

    public boolean isEnabledIniciar() {
        return btnIniciar.isEnabled();
    }

    public void setEnabledIniciar(boolean valor) {
        btnIniciar.setEnabled(valor);
    }

    public boolean isVisibleCopiar() {
        return btnCopiar.isVisible();
    }

    public void setVisibleCopiar(boolean valor) {
        btnCopiar.setVisible(valor);
    }

    public void setVisibleFinalizar(boolean valor) {
        btnFinalizar.setVisible(valor);
    }

    public boolean isEnabledFinalizar() {
        return btnFinalizar.isEnabled();
    }

    public void setEnabledFinalizar(boolean valor) {
        btnFinalizar.setEnabled(valor);
    }

    public boolean isEnabledCopiar() {
        return btnCopiar.isEnabled();
    }

    public void setEnabledCopiar(boolean valor) {
        btnCopiar.setEnabled(valor);
    }

    public boolean isVisibleBaixar() {
        return btnBaixar.isVisible();
    }

    public void setVisibleBaixar(boolean valor) {
        btnBaixar.setVisible(valor);
    }

    public boolean isEnabledBaixar() {
        return btnBaixar.isEnabled();
    }

    public void setEnabledBaixar(boolean valor) {
        btnBaixar.setEnabled(valor);
    }

    public boolean isVisibleExportar() {
        return btnExportar.isVisible();
    }

    public void setVisibleExportar(boolean valor) {
        btnExportar.setVisible(valor);
    }

    public boolean isEnabledExportar() {
        return btnExportar.isEnabled();
    }

    public void setEnabledExportar(boolean valor) {
        btnExportar.setEnabled(valor);
    }

    public boolean isVisibleParametrizar() {
        return btnParametrizar.isVisible();
    }

    public void setVisibleParametrizar(boolean valor) {
        btnParametrizar.setVisible(valor);
    }

    public boolean isEnabledParametrizar() {
        return btnParametrizar.isEnabled();
    }

    public void setEnabledParametrizar(boolean valor) {
        btnParametrizar.setEnabled(valor);
    }

    public boolean isVisibleConfigurar() {
        return btnConfigurar.isVisible();
    }

    public void setVisibleConfigurar(boolean valor) {
        btnConfigurar.setVisible(valor);
    }

    public boolean isEnabledConfigurar() {
        return btnConfigurar.isEnabled();
    }

    public void setEnabledConfigurar(boolean valor) {
        btnConfigurar.setEnabled(valor);
    }

    public boolean isVisibleImportar() {
        return btnImportar.isVisible();
    }

    public void setVisibleImportar(boolean valor) {
        btnImportar.setVisible(valor);
    }

    public boolean isEnabledImportar() {
        return btnImportar.isEnabled();
    }

    public void setEnabledImportar(boolean valor) {
        btnImportar.setEnabled(valor);
    }

    public boolean isVisibleEstornar() {
        return btnEstornar.isVisible();
    }

    public void setVisibleEstornar(boolean valor) {
        btnEstornar.setVisible(valor);
    }

    public boolean isEnabledEstornar() {
        return btnEstornar.isEnabled();
    }

    public void setEnabledEstornar(boolean valor) {
        btnEstornar.setEnabled(valor);
    }

    public boolean isVisibleFiltro() {
        return btnFiltro.isVisible();
    }

    public void setVisibleFiltro(boolean valor) {
        btnFiltro.setVisible(valor);
    }

    public boolean isEnabledFiltro() {
        return btnFiltro.isEnabled();
    }

    public void setEnabledFiltro(boolean valor) {
        btnFiltro.setEnabled(valor);
    }
}
